home *** CD-ROM | disk | FTP | other *** search
/ Almathera Ten Pack 2: CDPD 1 / Almathera Ten on Ten - Disc 2: CDPD 1.iso / pd / 276-300 / 288 / scripit / update.doc < prev    next >
Text File  |  1995-03-14  |  13KB  |  348 lines

  1. Changes from Scripit 1.10 to 1.20:
  2.  
  3. This file describes all the major changes done to Scripit since version
  4. 1.10.  It will refer to to other docs files if necessary.
  5.  
  6.  
  7. Bug Fixes:
  8. ----------
  9.  
  10. 1.  #version and $version were broken.  $version now reports "1.20" and
  11.     #version reports 120.
  12.  
  13. 2.  #argcount was always off by +1.  This is now fixed.
  14.  
  15. 3.  Some unwanted debug text was getting displayed when the GADGET command
  16.     was used.
  17.  
  18. 4.  $args[] that were not used had random garbage in them.  This made tests
  19.     like  IF $arg[5]  on an unused user argument invalid.  Now all args
  20.     (from $arg[1] to $arg[9]) are cleared except for those containing valid
  21.     arguments.  (the same goes for #arg[])
  22.  
  23. 5.  Using $window and $screen without selecting a window was dangerous.
  24.     Scripit now automatically selects the active window if either no window
  25.     was selected or if the currently selected window suddenly went away.
  26.  
  27. 6.  Major change in parser now correctly identifies and allows for null
  28.     arguments.  Previous version used to consider a null argument as the
  29.     last argument for a command.  This is now fixed.
  30.  
  31. 7.  XitLoadWB is now totally rewritten.  The major differences between this
  32.     and the older version are:
  33.  
  34.     a) XitLoadWB no longer loads WB itself.  So, you must modify your startup
  35.        sequence to become:
  36.  
  37.        ...
  38.        XitLoadWB
  39.        LoadWB
  40.        ...
  41.  
  42.        I.E.  You must have both XitLoadWB and LoadWB in your startup-sequence
  43.        with XitLoadWB first.
  44.  
  45.     b) XitLoadWB will now not allow you to run multiple copies of itself.
  46.     
  47.     c) These changes should fix the 2 major problems that XitLoadWB had:
  48.  
  49.        1. In some cases it would not load correctly.
  50.        2. Paths for shells or CLIs loaded from WB didn't correctly inherit
  51.           the paths in the startup-sequence.
  52.  
  53.     d) XitLoadWB will now show a brief (1 second) window that will inform you
  54.        that it has worked.  This will not come up until after Workbench
  55.        itself has loaded and started to display its icons.
  56.  
  57.     e) XitLoadWB will wait a maximum of 60 seconds for WB to load, otherwise
  58.        it will complain.
  59.  
  60.     f) Extended error messages.
  61.  
  62. 8.  The KEY \n keystroke would sometimes not produce a correct 'return' in
  63.     programs.  This has been fixed along with the following:
  64.  
  65.     \n  Return Key
  66.     \e  Enter Key  (on numeric keypad)
  67.     \t  Tab
  68.     \b  Backspace
  69.     \d  Delete
  70.     \x  Escape
  71.  
  72.     All those had problems with some programs (notably Uedit).  They are now
  73.     fixed and produce the correct key code.
  74.  
  75.  
  76. New Features:
  77. -------------
  78.  
  79. 1.  Shorthand LABEL format:
  80.  
  81.     To use the shorthand version of the LABEL command just use the label name
  82.     and a colon.  e.g.:
  83.  
  84.         EndlessLoop:
  85.         con echo "aaaa"
  86.         GOTO  EndlessLoop
  87.  
  88.  
  89. 2.  GOSUB/RETURN:
  90.     
  91.     GOSUB and RETURN work exactly as in BASIC.  GOSUB transfers execution to
  92.     a subroutine while perserving a return pointer to the next line after
  93.     the GOBSUB statement.  A RETURN statement picks up the last return
  94.     pointer stored on the return 'stack' and continues execution there.
  95.  
  96.     For example:
  97.  
  98.         IF #a > 100
  99.         CON ECHO "WARNING: Value is too high"
  100.         GOSUB Complain
  101.         END
  102.  
  103.         Complain:
  104.         CON ECHO "A = " #a
  105.         RETURN
  106.  
  107.     You can nest upto 24 levels of GOSUBS.  Scripit will abort with an error
  108.     message if you pass that level.
  109.  
  110.  
  111. 3.  New System Variables:
  112.  
  113.     (These all apply to the currently selected window and/or screen)
  114.  
  115.     #win.width    The window's width.
  116.     #win.height   The window's height.
  117.     #win.top      The window's top edge.
  118.     #win.left     The window's left edge.
  119.     #scr.width    The screen's width.
  120.     #scr.height   The screen's height.
  121.     #scr.top      The screen's top edge.
  122.     #scr.left     The screen's left edge.
  123.     #win.pen0     The window's front pen color.
  124.     #win.pen1     The window's back pen color.
  125.     #win.mx       The x position of the mouse pointer relative to the window.
  126.     #win.my       The y position of the mouse pointer relative to the window.
  127.     $scr.fontname The name of the current font in the screen.
  128.     #scr.fontsize The point size of the current font in the screen.
  129.     #win.fontsize The point size of the current font in the window.
  130.     #win.x        The x position of the gfx write pointer in the window.
  131.                   (This is the one set with GFX MOVE)
  132.     #win.y        The y position of the gfx write pointer in the window.
  133.     #mousex       The pointer x position relative to the actual monitor.
  134.     #mousey       The pointer y position relative to the actual monitor.
  135.     $currentdir   The full pathname of the current directory.
  136.  
  137.     The next variables are only for people that know what to do with them:
  138.  
  139.     #win.flags    These are the window flags as per the Window structure.
  140.     #scr.flags    These are the screen flags as per the Screen structure.
  141.  
  142.  
  143. 4.  New string assignment operator:   ?=  (Immediate resolve assignment)
  144.  
  145.     The ?= operator is the same as the = operator when using string variables
  146.     except that the ?= operator resolves integer variable names in the string
  147.     immediately.  For example:
  148.  
  149.     $test = #date
  150.     Using this $test will contain "#date".
  151.  
  152.     $test ?= #date
  153.     Using this $test will contain the current date "19890926".
  154.  
  155.     (Note: this only effect assigning integer variables to string variables.
  156.     String variable to string variable assign is always immediately resolved.
  157.     i.e.  $t = $date  and  $t ?= $date  both result in $t containing
  158.     "1989.09.26")
  159.  
  160.     Another note:  The ?= operator makes no difference when assigning to
  161.     integer variables since such assignments are always immediately resolved.
  162.  
  163.     (I hope this made some sense to you! :-)
  164.  
  165.     For example:  The following will open a console window the size of
  166.     the front screen:
  167.  
  168.         begin
  169.         select active
  170.         $console ?= "CON:0/0/" #scr.width "/" #scr.height "/ConsoleTitle"
  171.         con open $console
  172.  
  173.     Note: you should always have the integer variable name as a seperate
  174.     agrument.  This is because Scripit has no way of telling where the
  175.     variable name ends and the rest of the text begins.
  176.  
  177. 5.  Two new demo scripts are included.  'DL' and 'QB'.  They are examples
  178.     of real-life uses for Scripit.  Read the scripts before trying to run
  179.     them.  They are well commented.
  180.  
  181. 6.  A new plot.script (by Brian) is also included.  This one uses many
  182.     of the new facilities in 1.20.
  183.  
  184. 7.  System variables:  $result, $result2, $result3 
  185.                        #result, #result2, #result3
  186.  
  187.     These return result integers and strings based on the success or
  188.     failure of the command executed.  Read  'Result Codes' in Reference.DOC
  189.     for more details.
  190.  
  191.     The Reference.DOC file has been updated to show the results returned by
  192.     each command.  There are many commands that return a result.
  193.  
  194. 8.  GETGADGET command:
  195.     This is identical to the GADGET command, except that it doesn't actually
  196.     trigger or do anything to the gadget.  It will just check the gadget's
  197.     status and fill in the corresponding result variables as per the GADGET
  198.     command's return results.
  199.  
  200. 9.  'Xit' program is included.  It is totally compatible with Scripit 1.20
  201.     except that it doesn't support ARexx, cannot run normal files nor
  202.     compile them, and it doesn't have a file requester.  (So the REQUEST
  203.     command will do nothing.)  Xit will only run scripts compiled by
  204.     Scripit.  All compiled Scripit files contain a signature.  The first
  205.     4 bytes of the file are 'XIT2'.  Note:  Scripts compiled with the
  206.     old Scripit are no longer supported.  You have to recompile them with
  207.     Scripit 1.20.
  208.  
  209.     The main (and only) advantage in using Xit is in its size.  It is 20k
  210.     smaller than Scripit.
  211.  
  212. 10. New shorthand version of the 'EXECUTE' command: 'X'.
  213.  
  214. 11. New shorthand version of the 'SHOWVARS' command: '?'.
  215.     Both these 2 new shorthand versions were added for use in the
  216.     interactive mode of Scripit.  (i.e. when using  Scripit *)
  217.  
  218. 12. The EXECUTE, RUN, and RUNBACK commands now interpret any arguments
  219.     added after the command and these arguments are correctly passed to
  220.     the command being executed/run.  For example:
  221.  
  222.     RUN list df0:
  223.  
  224.     To give null arguments to a program, just use "".  e.g.:
  225.  
  226.     X Lister "" workbench
  227.  
  228.     Of course, any program name or argument that contains spaces or commas
  229.     needs to be in double quotes.
  230.  
  231.  
  232. 13. The SCREEN MOVE and SCREEN MOVETO commands are now implemented.  Check
  233.     out Reference.DOC for details.
  234.  
  235. 14. New Command:  WB FIND.  Allows you to search for a icon on the Workbench
  236.     screen without actually doing anything to it.  Check out Reference.DOC
  237.     for details.
  238.  
  239. 15. SHOWVARS now shows the result variables as well as the user arguments.
  240.     It also now allows you to see specific variables.  e.g.:
  241.     SHOWVARS var_1 var_2 .. var_n
  242.  
  243. 16. The \v and \w options in the KEY command.  \v is the mouse button
  244.     qualifier and allows you to simulate holding down the left, right, or
  245.     even middle mouse button with any other key sequence.  The \w simulates
  246.     a mouse click while pressing any other qualifiers.  (for example right-
  247.     shift and left mouse button: \rs\lw)
  248.  
  249. 17. Updated description of CON STYLE in Reference.DOC to show all possible
  250.     codes.
  251.  
  252. 18. The Reference.DOC file was reformatted to 78 columns.  (This was
  253.     requested by Brian.)
  254.  
  255. 19. New command: FORMAT.  This is a powerful command that allows for string
  256.     and integer output text formatting based on the C language sprintf().
  257.     Look at its description in Reference.DOC.
  258.  
  259. 20. Also, based on the above command, PRINTF, a new command does the same
  260.     function, except that it prints to the console immediately.  Another new
  261.     command: PRINT, which is a shorthand form of the CON TEXT command.
  262.  
  263. 21. Big change in parser now allows for string variables, integer variables
  264.     and formulas to be used as arguments for _any_ command.  Read 'Command
  265.     Arguments' in Reference.DOC.
  266.  
  267. 22. The Recorder will now automatically generate a 'SCREEN FRONT' statement
  268.     after every SELECT command.
  269.  
  270. 23. The Recorder now generates many comments about some SELECT commands. It
  271.     also generates 3 lines at the beginning of each line with the script
  272.     name and the recorder version.
  273.  
  274. 24. Scripit will no longer allow you to run it in ARexx mode more than once
  275.     using the same port name.
  276.  
  277. 25. Small change to Lister now allows you to stop its output while it is
  278.     printing to the console by hitting any key.  This was not possible
  279.     before.
  280.  
  281. 26. AutoScript has been rewritten in order to allow for CLI arguments to be
  282.     passed on to Scripit correctly when using autoexecute scripts.
  283.  
  284.     For example:
  285.  
  286.     This is a sample script called "showargs":
  287.  
  288.     BEGIN
  289.     SHOWVARS
  290.  
  291.     Using AutoScript, we make it into an auto executing script in S: by the
  292.     following command:
  293.  
  294.     AutoScript showargs s:
  295.  
  296.     This generates the following script as "s:showargs" :
  297.  
  298.     .key arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9
  299.     Scripit -w s:showargs "<arg1>" "<arg2>" "<arg3>" "<arg4>"
  300.                           "<arg5>" "<arg6>" "<arg7>" "<arg8>" "<arg9>"
  301.     ;BEGIN
  302.     ;SHOWVARS
  303.  
  304.  
  305.     The first line gets all the arguments passed to s:showargs which are
  306.     then passed over to Scripit in the second line.
  307.  
  308.     The -w flag is used so that Scripit won't complain on unknown commands.
  309.  
  310.     There is only one known problem with this technique:  #argcount is
  311.     always 9 no matter how many arguments you provide via this method.
  312.  
  313. 27. The CON TEXT, CON ECHO, PRINTF, and PRINT command now support special
  314.     codes in the text passed to them:
  315.  
  316.     \n  Return + Line feed
  317.     \e  Return (no line feed)
  318.     \r  Same as \e
  319.     \t  Tab
  320.     \b  Backspace
  321.  
  322.     These codes are only translated into actual returns, etc. when the
  323.     string is about to be printed, so if you store such codes in a string
  324.     variable, the code is stored, not the actual ASCII character.
  325.  
  326. 28. You can now use the double quote character (") as part of any argument.
  327.     To use it as part of the argument string, you should use the alternate
  328.     double quote character: (~).  
  329.  
  330.         For example:
  331.  
  332.         PRINT ~This is a "test" of using double quotes (").\n~
  333.  
  334.         You will get:
  335.  
  336.         This is a "test" of using double quotes (").
  337.  
  338.  
  339. NOTE:
  340.  
  341. You can use the Scripit package (Scripit and Lister, specifically) in order
  342. to remotely control another Amiga via the serial port (or modem)  Just issue
  343. a 'newcli aux:' command on the Amiga to be controlled, and then use a
  344. terminal program on the other Amiga.  Use Lister to find out what screens or
  345. windows (and menus, gadgets) are on the remote Amiga, and use Scripit itself
  346. to drive the programs on the remote Amiga.  If you need more details on how
  347. to do this, leave me a msg in Compuserve.
  348.